﻿@inject SignInManager<ApplicationUser> SignInManager
<h4>用其他平台的帐号登录</h4>
<hr />
@{
    var loginProviders = await SignInManager.GetExternalAuthenticationSchemesAsync();
    if (!loginProviders.Any())
    {
        <div>
            <p>
                需要添加其他平台
            </p>
        </div>
    }
    else
    {
        <form asp-controller="Account" asp-action="ExternalLogin" asp-route-returnurl="@ViewBag.ReturnUrl" method="post" class="form-horizontal" role="form">
            <div id="socialLoginList">
                <p>
                    @foreach (var p in loginProviders)
                    {
                        <button type="submit" class="btn btn-default" id="@p.Name" name="provider" value="@p.Name" title="用 @p.DisplayName 登录">@p.Name</button>
                    }
                </p>
            </div>
        </form>
    }
}